﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using Zeus.Components.Nopi.Excel;

namespace Zeus.Components.Nopi.Excel
{
    public class WorkBookInitializer
    {
        public static WorkBookModel GetInitModel(HSSFWorkbook workBook)
        {
            CellStyle cellStyle = workBook.CreateCellStyle();
            Font font = workBook.CreateFont();
            font.FontName = "Calibri";
            HSSFPalette palette = workBook.GetCustomPalette();

            WorkBookModel bookModel = new WorkBookModel()
                                          {
                                              CellStyle = cellStyle,
                                              Font = font,
                                              Palette = palette
                                          };

            return bookModel;
        }
    }
}